<template>
  <div>
    <el-menu
      class="el-menu-vertical-demo"
      :default-active="$route.path"
      active-text-color="#43bd86"
      background-color="#ffffff"
      style="border-right: none;text-align: center;"
    >
      <el-menu-item v-for="(item, index) in menuItems" :key="index" :index="item.index" @click="$router.push(item.path)">
        <i :class="item.icon"></i>
        <span slot="title">{{ item.title }}</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  data() {
    return {
      menuItems: [
        {
          index: "/homepage",
          path: "/homepage",
          icon: "el-icon-location-outline",
          title: "新闻主页",
        },
        {
          index: "/edit",
          path: "/edit",
          icon: "el-icon-edit",
          title: "新闻编辑",
        },
          {
              index: "/examine",
              path: "/examine",
              icon: "el-icon-s-check",
              title: "新闻审核",
          },
        {
          index: "/list",
          path: "/list",
          icon: "el-icon-s-fold",
          title: "新闻列表",
        },
          {
              index: "/comment",
              path: "/comment",
              icon: "el-icon-s-marketing",
              title: "评论管理",
          },
        {
          index: "/classification",
          path: "/classification",
          icon: "el-icon-menu",
          title: "新闻分类",
        },

        {
          index: "/img",
          path: "/img",
          icon: "el-icon-picture",
          title: "轮播图片",
        },
        {
          index: "/link",
          path: "/link",
          icon: "el-icon-share",
          title: "友情链接",
        },
        {
          index: "/user",
          path: "/user",
          icon: "el-icon-s-custom",
          title: "用户列表",
        },
        {
          index: "/personal",
          path: "/personal",
          icon: "el-icon-s-order",
          title: "个人信息",
        },
        {
          index: "/hotsearch",
          path: "/hotsearch",
          icon: "el-icon-s-marketing",
          title: "反馈管理",
        },

      ],
    };
  },
};
</script>

<style scoped>

</style>
